package com.stylefeng.guns.modular.owBackstageMgr.newsCategoryMgr.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.stylefeng.guns.modular.system.model.NewsCategory;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 文章类别表 服务类
 * </p>
 *
 * @author huangyuehong123
 * @since 2018-06-20
 */
public interface INewsCategoryService extends IService<NewsCategory> {

    /**
     * 获取所有的新闻类别
     */
    List<Map<String,Object>> getNewsCategories(Page<NewsCategory> page, String name, String orderByField, boolean asc);

    /**
     * 根据themeId主题id获取它所有的类别对象
     */
    List<NewsCategory> getCategoriesByThemeId(Long themeId, HttpServletRequest request);

    /**
     * 用类型名称获取类型id
     */
    Long getIdByName(String name);
}
